package thread.demo.arrayBlockingQueue;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;

public class ArrayBlockingQueueTest004 {
  public static void main(String[] args) throws InterruptedException {
    ArrayBlockingQueue<Integer> queue = new ArrayBlockingQueue<>(2);
    queue.put(1);
    queue.put(2);
    queue.put(3);
    
    System.out.println(queue.remove());
    System.out.println(queue.poll());
    queue.poll(10 , TimeUnit.SECONDS);
  }
}
